import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

const state = {
  userInfo: JSON.parse(localStorage.getItem('userInfo') )|| {}//从缓存里面拿到的数据
};
const getters = {};

const actions = {};

const mutations = {
  setPrint(state,userInfo){
    // localStorage.setItem('userInfo',userInfo)
    state.userInfo = userInfo;
  }

};

export default new Vuex.Store({
  state,
  getters,
  actions,
  mutations
})
